package Lib3d.MyUtils;


import Lib3d.MaterialLib;

/**
 * A material implementation of the Singleton pattern. This is done to have one
 * instance throughout the whole application.
 * 
 * @author Wassim Chegham
 * @version 0.1
 * @category Lib3d.MyUtils
 * 
 */
public class MaterialLibSingleton {

    private static MaterialLib instance;

    private MaterialLibSingleton() {}

    public static MaterialLib getInstance() {
        if (MaterialLibSingleton.instance == null) {
            MaterialLibSingleton.instance = new MaterialLib();
        }
        MaterialLibSingleton.instance.setTexturePath("data");
        return MaterialLibSingleton.instance;
    }

}
